<div class="content-section implementation GridDemo clearfixes requistView">
 <form>
  <div class="mysearch">
    <div class="ui-g">
      <div class="ui-g-5 ui-sm-12">
        <label class="ui-g-3 ui-sm-5 text-right">领用单号：</label>
        <div class="ui-g-3  ui-sm-7 ui-fluid">
          <input pInputText type="text" name="sid" placeholder="领用单号" [(ngModel)]="queryModel.condition.sid" />
        </div>
        <label class="ui-g-2 ui-sm-5 ui-no-padding-left-15px text-right">领用人:</label>
        <div class="ui-g-3 ui-sm-7 ui-fluid   ">
          <input  pInputText type="text" name="creator" placeholder="领用人" [(ngModel)]="queryModel.condition.creator"  />
        </div>
      </div>
      <div class="ui-g-3 ui-sm-12">
        <label class="ui-g-5 ui-sm-5 text-right">部门名称:</label>
        <div class="ui-g-6  ui-sm-7 ui-fluid">
          <input  pInputText type="text" name="department" placeholder="部门名称" [(ngModel)]="queryModel.condition.org"  />
        </div>
      </div>
      <div class="ui-g-3 ui-sm-12">
        <label  class="ui-g-2 ui-sm-5 text-right">状态:</label>
        <div class="ui-g-5  ui-sm-7 ui-fluid ">
          <p-dropdown [options]="MaterialStatusData"  [autoWidth]="false" name="cycle" (onChange)="suggestInsepectiones()" [(ngModel)]="queryModel.condition.status"></p-dropdown>
        </div>
        <div class="ui-g-5 ui-sm-12 option">
          <button pButton type="button" label="查询" ngClass="ui-sm-12" (click)="suggestInsepectiones()" ></button>
          <button pButton  label="清空" ngClass="ui-sm-12" (click)="clearSearch()"  ></button>
        </div>
      </div>
    </div>
  </div>
 </form>
  <div class="ui-g">
    <div class="ui-g-12 requestion">
      <p-dataTable [value]="MaterialData"
                   [totalRecords]="totalRecords"  [(selection)]="selectMaterial">
        <p-column  field="sid" header="领用单号" [sortable]="true" >
          <ng-template let-data="rowData" pTemplate="body" let-i="rowIndex">
            <span (click)="viewBorrowApproved(data)" class="curser">{{data.sid}}</span>
          </ng-template>
        </p-column>
        <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"  [sortable]="true"></p-column>
        <p-column header="操作">
          <ng-template let-car="rowData" pTemplate="body" let-i="rowIndex">
            <button pButton type="button"  label="编辑"  (click)="updateOption(MaterialData[i])" *ngIf="MaterialData[i]['status'] === '新建' || MaterialData[i]['status'] === '驳回'" ></button>
            <button pButton type="button"  label="审批"  (click)=" borrowApproved(MaterialData[i])" *ngIf="MaterialData[i]['status'] === '待审批'"  ></button>
            <button pButton type="button"  label="出库" (click)="updateOutboundRequestion(MaterialData[i])" *ngIf="MaterialData[i]['status'] === '待领用'"></button>
            <button pButton type="button"  label="删除" (click)="deleteMaterial(MaterialData[i])"  *ngIf="MaterialData[i]['status'] === '新建'"  ></button>
            <button pButton type="button"  label="查看"   (click)=" viewBorrowApproved(MaterialData[i])"  ></button>
          </ng-template>
        </p-column>
        <ng-template pTemplate="emptymessage">
          当前没有数据
        </ng-template>
      </p-dataTable>
      <p-paginator rows="10" [totalRecords]="totalRecords" [rowsPerPageOptions]="[10,20,30]" (onPageChange)="paginate($event)"></p-paginator>
    </div>
  </div>

</div>




